<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Remote Control: RemoteControl.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Remote Control
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.2 -->
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_remote_control_8h_source.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">RemoteControl.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#ifndef REMOTECONTROL_H</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define REMOTECONTROL_H</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_object_8h.html" title="Header for the Object class.">Object.h</a>&quot;</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &quot;ICommand.h&quot;</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div>
<div class="line"><a name="l00015"></a><span class="lineno"><a class="code" href="struct_slot.html">   15</a></span>&#160;<span class="keyword">struct </span><a class="code" href="struct_slot.html" title="Header for the RemoteControl class.">Slot</a>{</div>
<div class="line"><a name="l00017"></a><span class="lineno"><a class="code" href="struct_slot.html#a6164e623d4c079ec0b208171515b9e9a">   17</a></span>&#160;   <a class="code" href="class_i_command.html" title="Header for the ICommand interfaceclass.">ICommand</a>* <a class="code" href="struct_slot.html#a6164e623d4c079ec0b208171515b9e9a" title="The On-Command.">onCmd</a>;</div>
<div class="line"><a name="l00019"></a><span class="lineno"><a class="code" href="struct_slot.html#a451368355890690b836b7485595873ea">   19</a></span>&#160;   <a class="code" href="class_i_command.html" title="Header for the ICommand interfaceclass.">ICommand</a>* <a class="code" href="struct_slot.html#a451368355890690b836b7485595873ea" title="The Off-Command.">offCmd</a>;</div>
<div class="line"><a name="l00021"></a><span class="lineno"><a class="code" href="struct_slot.html#adbda31a4d0240b52fa50707a80160b5f">   21</a></span>&#160;   std::string <a class="code" href="struct_slot.html#adbda31a4d0240b52fa50707a80160b5f" title="The Device Name.">deviceName</a>;</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;};</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment">//typedef for a vector of data type Slot</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="keyword">typedef</span> std::vector&lt;Slot&gt; TSlots;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="code" href="class_remote_control.html">   38</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_remote_control.html" title="RemoteControl is able to remotely command devices it is programmed for.">RemoteControl</a> : <span class="keyword">public</span> <a class="code" href="class_object.html" title="Common Baseclass for all other classes.">Object</a> {</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;   <a class="code" href="class_remote_control.html#ab044b23a3d09877df6d905949881da4a" title="CTor of class RemoteControl.">RemoteControl</a>();</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;   <span class="keywordtype">void</span> <a class="code" href="class_remote_control.html#a597aacc1c1877558971d2c2543639b65" title="Function to execute the on command of a slot.">OnButtonPressed</a>(<span class="keywordtype">size_t</span> slotNr);</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;   <span class="keywordtype">void</span> <a class="code" href="class_remote_control.html#a296a8af782828f843ececaa87818a640" title="Function to execute the off command of a slot.">OffButtonPressed</a>(<span class="keywordtype">size_t</span> slotNr);</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;   <span class="keywordtype">void</span> <a class="code" href="class_remote_control.html#a1500060c997a241ec2eead37b625b3de" title="Undo the last executed command.">UndoButtonPressed</a>();</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;   <span class="keywordtype">void</span> <a class="code" href="class_remote_control.html#a215c1c39d975a140fad40eda0b2b6301" title="Program a slot of the remote control.">ProgramSlot</a>(<span class="keywordtype">size_t</span> slotNr, <a class="code" href="class_i_command.html" title="Header for the ICommand interfaceclass.">ICommand</a>* onCmd, <a class="code" href="class_i_command.html" title="Header for the ICommand interfaceclass.">ICommand</a>* offCmd, std::string <span class="keyword">const</span> devname);</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;   <span class="keywordtype">size_t</span> <span class="keyword">const</span> <a class="code" href="class_remote_control.html#a44913ef89c611945305dadb6654c3cc8" title="Function to return the number of slots.">GetNrOfSlots</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;   std::string <span class="keyword">const</span> <a class="code" href="class_remote_control.html#a2458bb7cbe0a6cf7273424db89fb4508" title="Function to return the name of a programmed device.">GetDeviceName</a>(<span class="keywordtype">size_t</span> slotNr) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;   <span class="comment">//vector of slots</span></div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;   TSlots mSlots;</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;   <span class="comment">//number of the slots</span></div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;   <span class="keywordtype">size_t</span> mNrOfSlots;</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;   <span class="comment">//last command used for undo function</span></div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;   <a class="code" href="class_i_command.html" title="Header for the ICommand interfaceclass.">ICommand</a> * mLastcmd;</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;};</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;<span class="preprocessor">#endif</span></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><b>RemoteControl.h</b></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.2 </li>
  </ul>
</div>
</body>
</html>
